import request from '@/utils/request'


// 查询公寓管理列表
export function listFlats(query) {
  return request({
    url: '/apartment/flats/list',
    method: 'get',
    params: query
  })
}


// 查询公寓管理详细
export function getFlats(flatsId) {
  return request({
    url: '/apartment/flats/' + flatsId,
    method: 'get'
  })
}


// 新增公寓管理
export function addFlats(data) {
  return request({
    url: '/apartment/flats',
    method: 'post',
    data: data
  })
}

// 修改公寓管理
export function updateFlats(data) {
  return request({
    url: '/apartment/flats',
    method: 'put',
    data: data
  })
}

// 删除公寓管理
export function delFlats(flatsId) {
  return request({
    url: '/apartment/flats/' + flatsId,
    method: 'delete'
  })
}


export function flatsLists(query) {
  return request({
    url: '/apartment/flats/all',
    method: 'get',
    params: query
  })
}
